package com.gmail.shazi199.satoriex.stage;

import org.lwjgl.input.Keyboard;

import com.gmail.shazi199.satoriex.entity.impl.Player;
import com.gmail.shazi199.satoriex.stage.image.ShowPic;
import com.gmail.shazi199.satoriex.stage.image.TitleMenu;
import com.gmail.shazi199.satoriex.utils.Drawer;

public class TitleStage implements BaseStage {

    private ShowPic bg;
    private TitleMenu menu;

    @Override
    public void update() {
        menu.update();

        while (Keyboard.next()) {
            menu.keyboardUpdate();
        }
    }

    @Override
    public void draw() {
        Drawer.clear();
        bg.draw();
        menu.draw();
    }

    public void init() {
        bg = new ShowPic("resource/image/title.png", 0, 0, 640, 480);
        menu = new TitleMenu(474, 254);
    }

    public TitleStage() {
        this.init();
    }

    @Override
    public Player getPlayer() {
        return null;
    }
}
